package com.video.netty.send;

import com.video.commons.sendaop.ISocketSend;
import com.video.entity.Solution;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * 删除方案，web发送
 * {"id":"delSolutionTask",
 *      "account":"admin",
 *      "name":"夏季作息", "msgid": "xxxxxxxxxxxxx"}
 *
 * {"id":"delSolutionTaskResponse","response":"success", "msgid": "xxxxxxxxxxxxx", "status":"succ"}
 * {"id":"delSolutionTaskResponse","response":"fail", "msgid": "xxxxxxxxxxxxx", "status":"fail"}
 */
@Component
public class DelSolutionTaskSend extends ISocketSend {

    @Override
    public Map<String, Object> sendMsg(Object... objs) {

        Solution solution = (Solution) objs[0];

        Map map = new HashMap();
        map.put("id", "delSolutionTask");
        map.put("name", solution.getSolutionname());
        return map;
    }
}
